﻿using System;
using MessagePack.Formatters;
using MessagePack.Internal;

namespace MessagePack.Resolvers
{
	// Token: 0x02000102 RID: 258
	public class BuiltinResolver : IFormatterResolver
	{
		// Token: 0x060003AF RID: 943 RVA: 0x0000D670 File Offset: 0x0000BA70
		private BuiltinResolver()
		{
		}

		// Token: 0x060003B0 RID: 944 RVA: 0x0000D678 File Offset: 0x0000BA78
		public IMessagePackFormatter<T> GetFormatter<T>()
		{
			return BuiltinResolver.FormatterCache<T>.formatter;
		}

		// Token: 0x04000156 RID: 342
		public static readonly IFormatterResolver Instance = new BuiltinResolver();

		// Token: 0x02000103 RID: 259
		private static class FormatterCache<T>
		{
			// Token: 0x04000157 RID: 343
			public static readonly IMessagePackFormatter<T> formatter = (IMessagePackFormatter<T>)BuiltinResolverGetFormatterHelper.GetFormatter(typeof(T));
		}
	}
}
